/******************************************************************************
 * The contents of this file are subject to the   JDI License  Version 1.0
 * ("License"); You may not use this file except in compliance with the License
 * Software distributed under the License is distributed on an  "AS IS"  basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 * The Initial Developer of the Original Code is 陈慧然. Portions created by 
 * 陈慧然 are Copyright 陈慧然.
 * All Rights Reserved.
 *
 *              Contact john_holen@163.com for licensing alternatives.
 *
 *****************************************************************************/


package org.peony.models;

import java.math.BigDecimal;

import org.peony.standard.ui.event.SIDataEventManager;

/**
 *  显示的组件Model
 *
 *  @author     陈慧然
 *  @version    Id: Component.java, v 0.000 2008-5-5 下午04:10:54 陈慧然 Exp
 */
public class MComponent {
	private String colunmName;						//列名
	private String id;								//id
	private int ComponentType = -1;					//组件类型
	private int seq = -1;							//显示排序序号
	private String defaultValue;					//默认值
	private String isNullable;						//是否可以为空
	private int length;								//最大长度
	private boolean isEditable = false;				//是否可以编辑
	private boolean hasOprator = false;				//是否有操作方法
	private SIDataEventManager dataManager;			//执行操作的对象
	private boolean isVirtual= false;				//是否为虚拟字段
	private String labelShowName;					//提示文本
	private boolean hasValueReference = false;		//是否具有值引用
	private String valueReferenceId;				//值引用ID
	private String maxValue;						//最大值
	private String minValue;						//最小值
	public String getColunmName() {
		return colunmName;
	}
	public void setColunmName(String colunmName) {
		this.colunmName = colunmName;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public int getComponentType() {
		return ComponentType;
	}
	public void setComponentType(int componentType) {
		ComponentType = componentType;
	}
	public String getDefaultValue() {
		return defaultValue;
	}
	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}
	public String getIsNullable() {
		return isNullable;
	}
	public void setIsNullable(String isNullable) {
		this.isNullable = isNullable;
	}
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public boolean isEditable() {
		return isEditable;
	}
	public void setEditable(boolean isEditable) {
		this.isEditable = isEditable;
	}
	public boolean isHasOprator() {
		return hasOprator;
	}
	public SIDataEventManager getDataManager() {
		return dataManager;
	}
	public void setDataManager(SIDataEventManager dataManager) {
		this.hasOprator = dataManager!=null;
		this.dataManager = dataManager;
	}
	public boolean isVirtual() {
		return isVirtual;
	}
	public void setVirtual(boolean isVirtual) {
		this.isVirtual = isVirtual;
	}
	public String getLabelShowName() {
		return labelShowName;
	}
	public void setLabelShowName(String labelShowName) {
		this.labelShowName = labelShowName;
	}
	public boolean isHasValueReference() {
		return hasValueReference;
	}
	public void setHasValueReference(boolean hasValueReference) {
		this.hasValueReference = hasValueReference;
	}
	public String getValueReferenceId() {
		return valueReferenceId;
	}
	public void setValueReferenceId(String valueReferenceId) {
		this.valueReferenceId = valueReferenceId;
	}
	public String getMaxValue() {
		return maxValue;
	}
	public void setMaxValue(String maxValue) {
		this.maxValue = maxValue;
	}
	public String getMinValue() {
		return minValue;
	}
	public void setMinValue(String minValue) {
		this.minValue = minValue;
	}
	public int getSeq() {
		return seq;
	}
	public void setSeq(int seq) {
		this.seq = seq;
	}	
}
